home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_06
/
9n06076a
< prev
next >
Wrap
Text File
|
1990-02-27
|
455b
|
19 lines
Listing 1: Traditional getopt(3) Command Line Processing
=========================================================
while ((option = getopt (argc, argv, optstring)) != -1) {
switch (option) {
case 'a': ... ; break ; /* Options */
case 'b': ... ; break ;
...
case '?': ... error ...
default: break ;
}
}
while (optind < argc) { /* Non-option arguments */
... process argv[optind++] ...
}